package View;

import java.awt.Component;

import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;

import Model.Privilege;

public class RendererPrivilege extends DefaultTableCellRenderer {
	private static final long serialVersionUID = 1L;
	
	public Component getTableCellRendererComponent(JTable table,Object value, boolean isSelected, boolean hasFocus, int row, int column) {
		 Component comp = super.getTableCellRendererComponent(table,  value, isSelected, hasFocus, row, column);
		
		 
		 comp.setBackground(((Privilege)value).getColor());
		
		return comp;
	}

	
}
